<?php
namespace app\admin\validate;

use think\Validate;

class Bed extends Validate
{
    protected $rule = [
        'pisition' => 'require',
        'nubmer' => 'require|number',
        'danger' => 'require',
    ];

    protected $message = [
        'pisition' => '{%pisition_val}',
        'nubmer' => '{%nubmer_val}',
        'danger' => '{%danger_val}',
    ];

    protected $scene = [
        'add'   => ['pisition', 'danger','nubmer'],
        'edit'  => ['pisition', 'danger','nubmer'],
        'status' => ['status'],
        'title' => ['title'],
        'writer' => ['writer'],
    ];
}